package czy.demo.pojo;

import java.io.Serializable;
import java.util.Date;

/**
 * 使用默认的序列化时，需要实现序列化接口，而且由于类加载原因，需要注释掉热部署开发工具的依赖
 */
public class Person implements Serializable {

    private static final long serialVersionUID = 2031883011247455201L;
    private Integer id;
    private String name;
    private Integer age;
    private Date create;

    /* 使用默认的序列化器Jackson时,需要一个默认构造函数,不然会报错 */
    public Person(){}

    public Person(Integer id, String name, Integer age, Date create) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.create = create;
    }


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Date getCreate() {
        return create;
    }

    public void setCreate(Date create) {
        this.create = create;
    }
}
